<template>
    <div class="main">
        <div class="header">
            <HeaderView></HeaderView>
        </div>
        <div class="menu">
            <MenuLeftView></MenuLeftView>
        </div>
        <div class="main-content">
            <!-- <keep-alive v-if="$route.meta.keepAlive">
                <router-view></router-view>
            </keep-alive> -->
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
import MenuLeftView from './view/MenuLeftView.vue'
import HeaderView from './view/HeaderView.vue'

export default {
    name: 'Main.vue',
    components: {
        MenuLeftView,
        HeaderView
    }
}
</script>

<style lang="less" scoped>
    .main {
        position: relative;
        height: 100%;
        .header {
            height: 70px;
            position: fixed;
            z-index: 99;
            right: 0px;
            left: 0px;
            box-shadow: 0 0 4px #999;
            background:-webkit-gradient(linear, 0 0, 0 left, from(#7853B0), to(#474A94));
            background: -moz-linear-gradient(left,  #7853B0 0%, #474A94 100%);
            background: -webkit-linear-gradient(left,  #7853B0 0%,#474A94 100%);
            background: -o-linear-gradient(left,  #7853B0 0%,#474A94 100%);
            background: -ms-linear-gradient(left,  #7853B0 0%,#474A94 100%);
            background: linear-gradient(to left,  #7853B0 0%,#474A94 100%);
        }
        .menu {
            position: fixed;
            z-index: 1;
            top: 71px;
            left: 0px;
            bottom: 0px;
            width: 180px;
            overflow-x: hidden;
            overflow-y: auto;
            box-shadow: 0px 0px 5px 0px #dddee1;
            background: #fff;
        }
        .main-content {
            position: absolute;
            top: 70px;
            left: 180px;
            right: 0px;
            bottom: 0px;
            background-color: #f8f8f8;
            padding: 5px;
            .page {
                padding: 5px;
                box-shadow: 0 0 5px 5px #E8E8F2;
                border-radius: 5px;
                background-color: #fff;
                margin-bottom: 5px;
            }
        }
    }
</style>